<template>
  <div class="wrapper">
    <el-pagination
      background
      layout="prev, pager, next"
      :page-count="state.totalPage"
      @current-change="changePage"
    >
    </el-pagination>
  </div>
</template>

<script>
import { reactive } from "vue";
export default {
  components: {},
  props:[
      'totalPage'
  ],
  setup(props, { emit }) {
    let state = reactive({
        totalPage:props.totalPage
    });
    function changePage(e){
        emit('changePage',e);
    }
    return {
      state,
      changePage
    };
  },
};
</script>
<style lang="scss" scoped>
.wrapper {
    display: flex;
    justify-content: flex-end;
    margin: 4px 0;
}
</style>